<form id="form1" method="post">
<div class="fieldset-body">
	<table class="form-table" border="0" cellpadding="1" cellspacing="2">
		<tr>
			<td class="form-label" style="width:100px;">类型:</td>
			<td style="width:200px"><input name="types" id="types" class="mini-combobox" textField="name" valueField="id" value="1" data="JS.CONST[5]" allowInput="true" style="width:100%;"/></td>
		</tr>
	</table>
	<table class="form-table" border="0" cellpadding="1" cellspacing="2">
		<tr>
			<td class="form-label customersh" style="width:100px;">顾客投诉人:</td>
			<td class="customersh" style="width:200px"><input name="customs_id" id="customs_id" class="mini-buttonedit" onbuttonclick="onButtonEdit(this,'/common/customer')" style="width:100%;"/></td>
			<td style="width:500px">&nbsp;</td>
		</tr>
		<tr>
			<td >&nbsp;</td>
			<td colspan="2"><font color="red">*请认真填写相关信息，这些信息将作为派工的依据！</font></td>
		</tr>
		<tr>
			<td class="form-label">标题(必须):</td>
			<td colspan="2"><input name="title" id="title" class="mini-textbox" emptyText="请输入主题" style="width:100%;"/></td>
		</tr>
		<tr>
			<td class="form-label">内容(必须):</td>
			<td colspan="2"><input name="content" id="content" class="mini-textarea" emptyText="请输入备注" style="width:100%;height:300px;"/></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><a class="mini-button" iconCls="icon-add" onclick="btnAdd()">增加业务申报工单</a></td>
			<td>&nbsp;</td>
		</tr>
	</table>
</div>
</form>
<script type="text/javascript">
mini.parse();
var form = new mini.Form("form1");

//增加记录
function btnAdd(){
	if ($.trim(mini.get("customs_id").getValue()) == "" ||
		$.trim(mini.get("title").getValue()) == "" ||
		$.trim(mini.get("content").getValue()) == ""
		){
		parent.$.dooDialog.alert("输入不正确，请重新输入！");
		return;
	}

	if ($.trim(mini.get("customs_id").getValue()) == $.trim(mini.get("customs_id").getText())){
		parent.$.dooDialog.alert("顾客投诉人不能直接输入，请重新选择！");
		return;
	}

	$.post('/service/declareSave',$("#form1").serializeArray(),function(data){
		if(data.code=='OK'){
			parent.$.dooDialog.alert('客服输入信息保存成功！');
		}else{
			parent.$.dooDialog.alert('客服输入信息保存失败！');
			return false;
		}
	},'json');
}
</script>
